package main

import "fmt"

//func change(x *int) {
//	*x = 200
//}

//func set_value(x_ptr *int) {
//	*x_ptr = 100
//}

func swap(x, y *int) {
	*x, *y = *y, *x
}

func main() {
	//var x int
	//var x_ptr *int

	//x = 10
	//x_ptr = &x

	//fmt.Println(x)
	//fmt.Println(x_ptr)
	//fmt.Println(*x_ptr)
	//fmt.Println(&x_ptr)

	//var x int = 100

	//fmt.Println(x)

	//change(&x)

	//fmt.Println(x)

	//x_ptr := new(int)
	//set_value(x_ptr)

	//fmt.Println(x_ptr)

	//fmt.Println(&x_ptr)

	//fmt.Println(*x_ptr)

	x_val := 100
	y_val := 200
	swap(&x_val, &y_val)

	fmt.Println(x_val)
	fmt.Println(y_val)
}
